<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Launcher Login</title>
<link rel="stylesheet" href="style.css">
<style>
body{margin:0;min-height:100vh;display:flex;align-items:center;justify-content:center;background:#202124;color:#00dd00;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif}
.login-card{background:#303134;border:1px solid #00dd00;border-radius:8px;box-shadow:0 0 12px #000;max-width:320px;width:100%;padding:24px;}
.login-card h1{margin:0 0 16px;text-align:center;font-size:22px;}
.login-card label{display:block;margin:10px 0 4px;color:#e0d204;font-size:14px;}
.login-card input{width:100%;padding:8px;border:1px solid #00dd00;border-radius:4px;background:#202124;color:#00dd00;}
.login-card button{width:100%;margin-top:18px;padding:10px;}
#notice{display:none;margin-bottom:12px;padding:8px;border:1px solid #e57373;border-radius:4px;color:#e57373;text-align:center;font-weight:600;}
</style>
</head>
<body>
<form class="login-card" action="/login" method="POST">
    <h1>-= Launcher =-</h1>
    <div id="notice"></div>
    <label for="username">Username</label>
    <input id="username" name="username" type="text" autocomplete="username" required>
    <label for="password">Password</label>
    <input id="password" name="password" type="password" autocomplete="current-password" required>
    <button type="submit">Login</button>
</form>
<script>
(()=>{const u=document.getElementById("username"),n=document.getElementById("notice"),p=new URLSearchParams(location.search);u.focus();if(p.has("failed")){n.textContent="Usuario ou senha invalidos.";n.style.display="block";}else if(p.has("loggedout")){n.textContent="Sessao encerrada com sucesso.";n.style.display="block";}})();
</script>
</body>
</html>
